<include file="Public/Header" />
<script src="__SCRIPT__/common.js" type="text/javascript"></script>
<script src="__PUBLIC__/DatePicker/DatePicker.js" type="text/javascript"></script>
<link href="__PUBLIC__/DatePicker/Css/DatePicker.css" type="text/css" rel="stylesheet" />
<table width="100%" height="31px" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
    <tr>
        <td height="31"><div class="titlebt">交易流水</div></td>
    </tr>
</table>

<div class="main">
    <div class="operate">
        <div class="left_pad">
            <form method="get" action="{:U('Member/Lists', 'do=SearchFlow')}">
                <input type="hidden" name="id" value="{$id}" />
                <label>交易类型：
                    <select name="trade_type">
                        <option value="0">全部</option>
                        <volist name="trade_type" id="vo">
                            <if condition="$vo['common_class_id'] == $type">
                                <php>$selected = ' selected = "selected"';</php>
                            <else />
                                <php>$selected = '';</php>
                            </if>
                            <option value="{$vo.common_class_id}"{$selected}>{$vo.common_class_name}</option>
                        </volist>
                    </select>
                </label>
                <label>交易时间：<input type="text" class="inp_default" style="width:180px; text-align: center;" name="date" id="datePicker" readonly /></label>
                <label>交易流水：<input type="text" name="order_sn" title="关键字" class="inp_default" value="{$order_sn}"></label>
                <input type="submit" class="btn_blue" value="查  询">



                <input type="button" class="btn_blue" value="全  部" onclick="location.href='{:U('Member/Lists', "do=log&id=$id")}'">
                <script type="text/javascript">
                    //var STATS_START_TIME = '1329148800';
                    var dateRange1 = new pickerDateRange('datePicker', {
                        isTodayValid: true,
                        aToday: 'aTodayDemo1', //今天
                        aRecent30Days: 'aRecent30DaysDemo1', //最近30天
                        aRecent90Days: 'aRecent90DaysDemo1', //最近90天
                        aRecent1Year: 'aRecent1YearDemo1',//最近1年
                        <empty name="start">
                            startDate: '{:date('Y-m-d', time()-2592000)}',
                            endDate: '{:date('Y-m-d', time())}',
                        <else />
                            startDate: '{$start}',
                            endDate:   '{$end}',
                        </empty>
                        needCompare: false,
                        target: 'searchForm',
                        defaultText: ' ~ ',
                        autoSubmit: true,
                        inputTrigger: 'datePicker',
                        theme: 'ta',
                        magicSelect: false,
                    });


                </script>
            </form>
        </div>
    </div>
    <div class="list">
            <table width="100%">
                <tr>
                    <th>流水号</th>
                    <th>收入</th>
                    <th>支出</th>
                    <th>平台</th>
                    <th>交易类型</th>
                    <th>变更说明</th>
                    <th>创建时间</th>
                </tr>

                <empty name="list">

                    <tr>
                        <td colspan="9">本区域暂无数据显示...</td>
                    </tr>
                    <else />
                    <volist name='list' id='v'>
                        <tr>
                            <td>{$v.money_log_no}</td>
                            <td>
                                <if condition="$v['money_log_count'] gt 0">
                                    <span class="green" style="color:#718c00;">{$v.money_log_count|price=###, false}</span>
                                </if>
                            </td>
                            <td>
                                <if condition="$v['money_log_count'] lt 0">
                                    <span class="red">{$v.money_log_count|price=###, false}<span>
                                </if>
                            </td>
                            <td>{$v.platform_name}</td>
                            <td>{$v.common_class_name}</td>
                            <td>{$v.money_log_desc}</td>
                            <td>{$v.money_log_time|date='Y-m-d H:i:s',###}</td>
                        </tr>
                    </volist>
                </empty>


            </table>

    </div>

    <div id="page-list" style="text-align: center"></div>

</div>
<include file="Public/Copyright" />
<script type="text/javascript" src="__PUBLIC__/Layerpage/laypage.js"></script>
<script type="text/javascript">
    laypage({
        cont: 'page-list',
        pages: {$pages},
        first: 1,
        last: {$pages},
        prev: '<',
        next: '>',
        curr: function(){
            var page = location.search.match(/page=(\d+)/);
            return page ? page[1] : 1;

        }(),
        jump: function(e, first){ //
            if(!first){
                var l = location.href.replace(/&page=\d+/, '');
                location.href = page() + e.curr;
            }
        }
    });

    function page(){
        var u = location.href;
        var r = '';
        if(u.indexOf('&') > 0){
            r = location.href.replace(/&page=\d+/, '');
            return r + '&page=';
        }else if(u.indexOf('?') > 0 ){
            if(u.indexOf('?page') > 0 ){
                r = location.href.replace(/\?page=\d+/, '');
                return r + '?page=';
            }else{
                return r + '&page=';
            }
        }else{
            return location.href + '?page=';
        }
    }

    $('.delete-one').click(function(){
        if( ! window.confirm('确认要删除该游戏吗？') ){
            return false;
        }
    })
</script>
</body>
</html>
